package com.hxw.entity;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Think on 2018/9/1.
 * 在JAVA中用@ConfigurationProperties 将以a为前缀的参数注入到当前变量中，需要有setXxx()方法
 */
@RestController
@ConfigurationProperties(prefix = "b")
public class EntityByBProperties {
    private Integer id;
    private String name;
    private String score;

    @GetMapping(value = "bText")
    public Object bText(){
        return id;
    }

    public void setId(Integer id){
        this.id = id;
    }

    public void setName(String name){
        this.name = name;
    }

    public void setScore(String score){
        this.score = score;
    }

}
